Skip to content

Comments

[stable4.3] Fix: Remove extraneous JSON preamble from LLM responses#10968

Closed
backportbot[bot] wants to merge 2 commits intostable4.3from
backport/10966/stable4.3
Closed

[stable4.3] Fix: Remove extraneous JSON preamble from LLM responses#10968
backportbot[bot] wants to merge 2 commits intostable4.3from
backport/10966/stable4.3

Conversation

@backportbot
Copy link

@backportbot backportbot bot commented Apr 4, 2025

Backport of #10966

Warning, This backport's changes differ from the original and might be incomplete ⚠️

Todo

  • Review and resolve any conflicts
  • Amend HEAD commit to remove the line stating to skip CI

Learn more about backports at https://docs.nextcloud.com/server/stable/go.php?to=developer-backports.

sto-j and others added 2 commits April 4, 2025 13:44
The most of the LLM's return in JSON markdown format, example:
```json
{
  "reply1": "Received, thanks...",
  "reply2": "Thanks for forwarding this..."
}
```
Adding additional instructions did't help. 

This is solution to strip:
```json
```
from the answer. 

Signed-off-by: sto-j <162719726+sto-j@users.noreply.github.com>
Signed-off-by: Hamza Mahjoubi <hamzamahjoubi221@gmail.com>

[skip ci]
@backportbot backportbot bot requested review from ChristophWurst and hamza221 April 4, 2025 13:44
@backportbot backportbot bot added this to the v4.3.0 milestone Apr 4, 2025
@ChristophWurst
Copy link
Member

tests got lost

@ChristophWurst
Copy link
Member

4.3 has reached EOL. Closing

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants